﻿{% extends "gma/base.html" %}
{% load mytag %}

<!-- CONTENT
  =====================================================================-->

{% block content %}

<div class="page__hd">
    <h1 class="page__title">
        <i class="fa fa-archive weui_grid_icon_fa" style="font-size: 32px;"> </i> 统计数据
    </h1>
    <p class="page__desc"> YYZBAPP的数值统计。 </p>
</div>

<div class="page__bd">
    <div class="weui-cells__title"> 历史统计数据 </div>
    <div class="weui-cells">
{#        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-05-01' '2019-06-01' %}">#}
{#            <div class="weui-cell__bd"> <p> <i class="fa fa-yen-sign gm_menu_item_icon"></i> 2019年5月 </p> </div>#}
{#            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>#}
{#        </a>#}

{#        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-04-22' '2019-04-29' %}">#}
{#            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年4月 第4周 </p> </div>#}
{#            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>#}
{#        </a>#}
{##}
{#        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-04-15' '2019-04-22' %}">#}
{#            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年4月 第3周 </p> </div>#}
{#            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>#}
{#        </a>#}
{##}
{#        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-04-08' '2019-04-15' %}">#}
{#            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年4月 第2周 </p> </div>#}
{#            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>#}
{#        </a>#}
{##}
{#        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-04-01' '2019-04-08' %}">#}
{#            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年4月 第1周 </p> </div>#}
{#            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>#}
{#        </a>#}
{##}
{#        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-03-25' '2019-04-01' %}">#}
{#            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年3月 第4周 </p> </div>#}
{#            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>#}
{#        </a>#}

        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-07-01' '2019-08-01' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年7月 </p> </div>
            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>
        </a>

        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-06-01' '2019-07-01' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年6月 </p> </div>
            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>
        </a>

        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-05-01' '2019-06-01' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年5月 </p> </div>
            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>
        </a>

        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-04-01' '2019-05-01' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年4月 </p> </div>
            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>
        </a>

        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-03-01' '2019-04-01' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年3月 </p> </div>
            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>
        </a>

        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-02-01' '2019-03-01' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年2月 </p> </div>
            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>
        </a>

        <a class="weui-cell weui-cell_access" href="{% url 'gma:archive_stat_data' '2019-01-01' '2019-02-01' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-archive gm_menu_item_icon"></i> 2019年1月 </p> </div>
            <div class="weui-cell__ft"> <span class="green_color"><b> </b></span> </div>
        </a>
    </div>

    <div class="weui-cells__title"> 今日摘要 </div>
    <div class="weui-cells">
        <a class="weui-cell weui-cell_access" href="{% url 'gma:pay_chart_detail' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-yen-sign gm_menu_item_icon"></i> 今日充值金额 </p> </div>
            <div class="weui-cell__ft"> <span class="green_color"><b>￥{{ today_pay_amount }}</b></span> </div>
        </a>
        <a class="weui-cell weui-cell_access" href="{% url 'gma:new_user_chart_detail' %}">
            <div class="weui-cell__bd"> <p> <i class="fab fa-apple gm_menu_item_icon"></i> 今日累计新增 </p> </div>
            <div class="weui-cell__ft"> {{ today_new_user_count }} 人 </div>
        </a>

        <a class="weui-cell weui-cell_access" href="{% url 'gma:call_count_chart_detail' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-phone gm_menu_item_icon"></i> 今日通话次数 </p> </div>
            <div class="weui-cell__ft"> {{ today_call_count }} 次 </div>
        </a>
        <a class="weui-cell weui-cell_access" href="{% url 'gma:call_seconds_chart_detail' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-stopwatch gm_menu_item_icon"></i> 今日通话时长 </p> </div>
            <div class="weui-cell__ft"> {{ today_call_seconds|readable_seconds }} </div>
        </a>
    </div>

    {% if permissions.gm_management.open %}
    <div class="weui-cells__title"> 今日详情 </div>
    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fab fa-apple gm_menu_item_icon"></i> 今日iOS新增 </p> </div>
            <div class="weui-cell__ft"> {{ today_ios_new_user_count }} 人 </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fab fa-android gm_menu_item_icon"></i> 今日Android新增 </p> </div>
            <div class="weui-cell__ft"> {{ today_and_new_user_count }} 人 </div>
        </div>
    </div>

    <div class="weui-cells__title"> 本周摘要 </div>
    <div class="weui-cells">
                    <div class="weui-cell">
                        <div class="weui-cell__bd"> <p> <i class="fa fa-user-plus gm_menu_item_icon"></i> 新增用户 </p> </div>
                        <div class="weui-cell__ft"> {{ new_user_count }} 人 </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__bd"> <p> <i class="fa fa-user-plus gm_menu_item_icon"></i> 新增主播 </p> </div>
                        <div class="weui-cell__ft"> {{ new_caster_count }} 人 </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__bd"> <p> <i class="fa fa-user-check gm_menu_item_icon"></i> 新增充值用户 </p> </div>
                        <div class="weui-cell__ft"> {{ paid_new_user_count }} 人 </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__bd"> <p> <i class="fa fa-money-bill-alt gm_menu_item_icon"></i> 新增用户充值金额 </p> </div>
                        <div class="weui-cell__ft"> ￥ {{ paid_amount }} </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__bd"> <p> <i class="fa fa-percent gm_menu_item_icon"></i> 付费渗透率 </p> </div>
                        <div class="weui-cell__ft"> {{ pur }}% </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__bd"> <p> <i class="fa fa-yen-sign gm_menu_item_icon"></i> ARPU </p> </div>
                        <div class="weui-cell__ft"> ￥ {{ arpu }} </div>
                    </div>
                    <div class="weui-cell">
                        <div class="weui-cell__bd"> <p> <i class="fa fa-yen-sign gm_menu_item_icon"></i> ARPPU </p> </div>
                        <div class="weui-cell__ft"> ￥ {{ arppu }} </div>
                    </div>
                </div>

    <div class="weui-cells__title"> 数据分析 </div>
    <div class="weui-cells">
        <a class="weui-cell weui-cell_access" href="{% url 'gma:daily_list' 1 %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-chart-line gm_menu_item_icon"></i> 用户新增 & 在线主播分析 </p> </div>
            <div class="weui-cell__ft">  </div>
        </a>

         <a class="weui-cell weui-cell_access" href="{% url 'gma:daily_list' 2 %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-chart-line gm_menu_item_icon"></i> 用户新增 & 通话次数分析 </p> </div>
            <div class="weui-cell__ft">  </div>
        </a>
    </div>
    {% endif %}

    <div class="weui-cells__title"> 充值统计 </div>
    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fa fa-yen-sign gm_menu_item_icon"></i> 累计充值金额 </p> </div>
            <div class="weui-cell__ft"> ￥ {{ total_pay_amount }} </div>
        </div>
    </div>

    <div class="weui-cells__title"> 消费统计 </div>
    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fa fa-phone gm_menu_item_icon"></i> 累计视频通话收益 </p> </div>
            <div class="weui-cell__ft"> {{ total_vchat_income }} <i class="fa fa-ticket-alt"></i> </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fab fa-youtube gm_menu_item_icon"></i> 累计短视频收益 </p> </div>
            <div class="weui-cell__ft"> {{ total_video_income }} <i class="fa fa-ticket-alt"></i> </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fa fa-comments gm_menu_item_icon"></i> 累计付费私信收益 </p> </div>
            <div class="weui-cell__ft"> {{ total_message_income }} <i class="fa fa-ticket-alt"></i> </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fa fa-gift gm_menu_item_icon"></i> 累计礼物收益 </p> </div>
            <div class="weui-cell__ft"> {{ total_gift_income }} <i class="fa fa-ticket-alt"></i> </div>
        </div>
    </div>

    <div class="weui-cells__title"> 用户统计 </div>
    <div class="weui-cells">
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fa fa-user-graduate gm_menu_item_icon"></i> 主播总数 </p> </div>
            <div class="weui-cell__ft"> {{ total_broadcaster_count }}人 </div>
        </div>
        <div class="weui-cell">
            <div class="weui-cell__bd"> <p> <i class="fa fa-users gm_menu_item_icon"></i> 用户总数 </p> </div>
            <div class="weui-cell__ft"> {{ total_user_count }}人 </div>
        </div>
    </div>

    {% if permissions.system_config.open %}
    <div class="weui-cells__title"> 数据监测 </div>
    <div class="weui-cells">
        <a class="weui-cell weui-cell_access" href="{% url 'gma:diamond_detail' %}">
            <div class="weui-cell__bd"> <p> <i class="fa fa-gem gm_menu_item_icon"></i> 钻石误差 </p> </div>
            {% if diamond_detail.diamond_delta == 0 %}
            <div class="weui-cell__ft"> {{ diamond_detail.diamond_delta }} <i class="fa fa-gem"></i> </div>
            {% else %}
            <div class="weui-cell__ft" style="color:red"> {{ diamond_detail.diamond_delta }} <i class="fa fa-gem"></i> </div>
            {% endif %}
        </a>
    </div>
    {% endif %}
</div>

<div class="page__ft">
    <a href="{% url 'gma:home' %}">
        <span class="bottom-logo">
           HiBao
       </span>
    </a>
</div>

{% endblock content %}


<!-- SCRIPT
  =====================================================================-->

{% block extra_js %}
{% endblock extra_js %}